/* 用户中心页面样式 */

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.user-dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
}

.dropdown-icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.user-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    margin-top: 5px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.user-dropdown-menu a:hover {
    background-color: var(--bg-light);
}

.user-dropdown-menu a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.user-dropdown-menu .logout-link {
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
    color: var(--danger-color);
}

/* 仪表盘布局 */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: var(--bg-light);
}

/* 侧边栏 */
.dashboard-sidebar {
    width: 260px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.user-info {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    position: relative;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.avatar-edit-btn:hover {
    background-color: var(--primary-dark);
}

.avatar-edit-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.user-info h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.user-membership {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.membership-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #e9f7fe;
    color: #0095ff;
}

.membership-badge.premium {
    background-color: #fff4e6;
    color: #ff9500;
}

.membership-expiry {
    font-size: 0.8rem;
    color: var(--text-light);
}

.dashboard-nav {
    flex-grow: 1;
    padding: 20px 0;
}

.dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav li {
    margin-bottom: 5px;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

.dashboard-nav a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dashboard-nav a.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.dashboard-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
}

.dashboard-nav a img {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: 0.7;
}

.dashboard-nav a.active img {
    opacity: 1;
}

.feature-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background-color: #fff4e6;
    color: #ff9500;
    margin-left: auto;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.sidebar-footer a:hover {
    color: var(--primary-color);
}

.sidebar-footer a img {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    opacity: 0.7;
}

.sidebar-footer .logout-link {
    color: var(--danger-color);
}

/* 主内容区 */
.dashboard-main {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.dashboard-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* 统计卡片 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon img {
    width: 24px;
    height: 24px;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 5px;
}

.stat-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

/* 仪表盘区块 */
.dashboard-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 0;
}

/* 简历卡片 */
.resume-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.resume-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resume-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.resume-preview {
    height: 160px;
    overflow: hidden;
}

.resume-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.resume-card:hover .resume-preview img {
    transform: scale(1.05);
}

.resume-card-content {
    padding: 15px;
}

.resume-card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.resume-last-edit {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.resume-actions {
    display: flex;
    gap: 10px;
}

.add-resume {
    border: 2px dashed var(--border-color);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.add-resume:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.add-resume-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 30px;
    width: 100%;
    height: 100%;
}

.add-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.add-icon img {
    width: 24px;
    height: 24px;
}

.add-resume-link p {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 500;
}

/* 会员卡片 */
.membership-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.membership-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.membership-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.membership-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.membership-badge-large {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: #e9f7fe;
    color: #0095ff;
}

.membership-badge-large.premium {
    background-color: #fff4e6;
    color: #ff9500;
}

.membership-badge-large img {
    width: 18px;
    height: 18px;
}

.membership-benefits {
    padding: 20px;
}

.membership-benefits h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.benefits-list li img {
    width: 18px;
    height: 18px;
}

/* 活动列表 */
.activity-list {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon img {
    width: 20px;
    height: 20px;
}

.activity-content {
    flex-grow: 1;
}

.activity-text {
    font-size: 0.95rem;
    color: var(--text-color);
    margin: 0 0 5px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resume-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .user-info {
        padding: 20px;
    }
    
    .user-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .dashboard-nav {
        padding: 10px 0;
    }
    
    .dashboard-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .dashboard-nav li {
        margin-bottom: 0;
        flex-grow: 1;
    }
    
    .dashboard-nav a {
        padding: 10px 15px;
        justify-content: center;
    }
    
    .dashboard-nav a img {
        margin-right: 8px;
    }
    
    .dashboard-nav a.active::before {
        width: 100%;
        height: 3px;
        top: auto;
        bottom: 0;
        left: 0;
    }
    
    .sidebar-footer {
        display: none;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .resume-cards {
        grid-template-columns: 1fr;
    }
    
    .membership-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .dashboard-nav ul {
        flex-direction: column;
    }
    
    .dashboard-nav a {
        justify-content: flex-start;
        min-height: 44px;
        padding: 12px 15px;
    }
    
    .dashboard-nav a.active::before {
        width: 4px;
        height: 100%;
        top: 0;
        bottom: auto;
    }
    
    .dashboard-main {
        padding: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .resume-card {
        padding: 15px;
    }
    
    .resume-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .resume-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .membership-card {
        padding: 20px 15px;
    }
    
    .benefits-list {
        gap: 10px;
    }
    
    .activity-item {
        padding: 12px;
    }
}